object dmGeral: TdmGeral
  OldCreateOrder = False
  OnCreate = DataModuleCreate
  Left = 283
  Top = 238
  Height = 379
  Width = 676
  object SQLConnectionBD: TSQLConnection
    ConnectionName = 'Supervisao V4 Smart'
    DriverName = 'Interbase'
    GetDriverFunc = 'getSQLDriverINTERBASE'
    LibraryName = 'dbexpint.dll'
    LoginPrompt = False
    Params.Strings = (
      'DriverName=Interbase'
      
        'Database=localhost:D:\Projetos\Allpharma V1\PharmaUP\basedados\S' +
        'INGULAR.FDB'
      'RoleName='
      'User_Name=sysdba'
      'Password=masterkey'
      'ServerCharSet='
      'SQLDialect=3'
      'BlobSize=-1'
      'CommitRetain=False'
      'WaitOnLocks=True'
      'ErrorResourceFile='
      'LocaleCode=0000'
      'Interbase TransIsolation=ReadCommited'
      'Trim Char=False')
    VendorLib = 'fbclient.dll'
    Left = 152
    Top = 8
  end
  object sqlConsultaEmp: TSQLQuery
    MaxBlobSize = -1
    Params = <>
    SQL.Strings = (
      'SELECT'
      '    e.cod_empresa,'
      '    e.cod_singular,'
      '    e.razao_social,'
      '    e.nome_fantasia,'
      '    e.descricao_multiempresa,'
      '    e.cnpj,'
      '    e.ie,'
      '    e.tel_comercial,'
      '    e.tel_fax,'
      '    e.tel_sac,'
      '    e.cep,'
      '    e.endereco,'
      '    e.numero,'
      '    e.bairro,'
      '    e.localidade,'
      '    e.uf,'
      '    e.obs,'
      '    e.data_alteracao,'
      '    e.website,'
      '    e.responsavel,'
      '    e.responsavel_email,'
      '    e.responsavel_telefone,'
      '    e.responsavel_celular,'
      '    e.agente_autorizado,'
      '    e.agente_consultor,'
      '    e.agente_consultor_email,'
      '    e.agente_consultor_telefone,'
      '    e.sistema_implantacao,'
      '    e.sistema_ult_backup,'
      '    e.sistema_ult_atualizacao,'
      '    e.sistema_versao,'
      '    e.sistema_bloqueio,'
      '    e.sistema_sms_login,'
      '    e.sistema_sms_senha'
      'FROM EMPRESA e'
      'order by e.cod_empresa')
    SQLConnection = SQLConnectionBD
    Left = 32
    Top = 120
  end
  object cdsConsultaEmp: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspConsultaEmp'
    Left = 32
    Top = 216
    object cdsConsultaEmpCOD_EMPRESA: TIntegerField
      FieldName = 'COD_EMPRESA'
      Required = True
    end
    object cdsConsultaEmpCOD_SINGULAR: TIntegerField
      FieldName = 'COD_SINGULAR'
    end
    object cdsConsultaEmpRAZAO_SOCIAL: TStringField
      FieldName = 'RAZAO_SOCIAL'
      Size = 100
    end
    object cdsConsultaEmpNOME_FANTASIA: TStringField
      FieldName = 'NOME_FANTASIA'
      Size = 100
    end
    object cdsConsultaEmpCNPJ: TStringField
      FieldName = 'CNPJ'
    end
    object cdsConsultaEmpIE: TStringField
      FieldName = 'IE'
    end
    object cdsConsultaEmpTEL_COMERCIAL: TStringField
      FieldName = 'TEL_COMERCIAL'
      Size = 15
    end
    object cdsConsultaEmpTEL_FAX: TStringField
      FieldName = 'TEL_FAX'
      Size = 15
    end
    object cdsConsultaEmpTEL_SAC: TStringField
      FieldName = 'TEL_SAC'
      Size = 15
    end
    object cdsConsultaEmpCEP: TStringField
      FieldName = 'CEP'
      Size = 10
    end
    object cdsConsultaEmpENDERECO: TStringField
      FieldName = 'ENDERECO'
      Size = 100
    end
    object cdsConsultaEmpNUMERO: TStringField
      FieldName = 'NUMERO'
      Size = 4
    end
    object cdsConsultaEmpBAIRRO: TStringField
      FieldName = 'BAIRRO'
      Size = 100
    end
    object cdsConsultaEmpLOCALIDADE: TStringField
      FieldName = 'LOCALIDADE'
      Size = 100
    end
    object cdsConsultaEmpUF: TStringField
      FieldName = 'UF'
      FixedChar = True
      Size = 2
    end
    object cdsConsultaEmpOBS: TStringField
      FieldName = 'OBS'
      Size = 10000
    end
    object cdsConsultaEmpDATA_ALTERACAO: TDateField
      FieldName = 'DATA_ALTERACAO'
    end
    object cdsConsultaEmpWEBSITE: TStringField
      FieldName = 'WEBSITE'
      Size = 100
    end
    object cdsConsultaEmpRESPONSAVEL: TStringField
      FieldName = 'RESPONSAVEL'
      Size = 100
    end
    object cdsConsultaEmpRESPONSAVEL_EMAIL: TStringField
      FieldName = 'RESPONSAVEL_EMAIL'
      Size = 100
    end
    object cdsConsultaEmpRESPONSAVEL_TELEFONE: TStringField
      FieldName = 'RESPONSAVEL_TELEFONE'
      Size = 15
    end
    object cdsConsultaEmpRESPONSAVEL_CELULAR: TStringField
      FieldName = 'RESPONSAVEL_CELULAR'
      Size = 15
    end
    object cdsConsultaEmpAGENTE_AUTORIZADO: TStringField
      FieldName = 'AGENTE_AUTORIZADO'
      Size = 100
    end
    object cdsConsultaEmpAGENTE_CONSULTOR: TStringField
      FieldName = 'AGENTE_CONSULTOR'
      Size = 100
    end
    object cdsConsultaEmpAGENTE_CONSULTOR_EMAIL: TStringField
      FieldName = 'AGENTE_CONSULTOR_EMAIL'
      Size = 100
    end
    object cdsConsultaEmpAGENTE_CONSULTOR_TELEFONE: TStringField
      FieldName = 'AGENTE_CONSULTOR_TELEFONE'
      Size = 15
    end
    object cdsConsultaEmpSISTEMA_IMPLANTACAO: TDateField
      FieldName = 'SISTEMA_IMPLANTACAO'
    end
    object cdsConsultaEmpSISTEMA_ULT_BACKUP: TDateField
      FieldName = 'SISTEMA_ULT_BACKUP'
    end
    object cdsConsultaEmpSISTEMA_ULT_ATUALIZACAO: TDateField
      FieldName = 'SISTEMA_ULT_ATUALIZACAO'
    end
    object cdsConsultaEmpSISTEMA_VERSAO: TStringField
      FieldName = 'SISTEMA_VERSAO'
      Size = 10
    end
    object cdsConsultaEmpSISTEMA_BLOQUEIO: TDateField
      FieldName = 'SISTEMA_BLOQUEIO'
    end
    object cdsConsultaEmpSISTEMA_SMS_LOGIN: TStringField
      FieldName = 'SISTEMA_SMS_LOGIN'
      Size = 50
    end
    object cdsConsultaEmpSISTEMA_SMS_SENHA: TStringField
      FieldName = 'SISTEMA_SMS_SENHA'
      Size = 50
    end
    object cdsConsultaEmpDESCRICAO_MULTIEMPRESA: TStringField
      FieldName = 'DESCRICAO_MULTIEMPRESA'
      Size = 50
    end
  end
  object dspConsultaEmp: TDataSetProvider
    DataSet = sqlConsultaEmp
    Left = 32
    Top = 168
  end
  object ZConnectionMysql: TZConnection
    ControlsCodePage = cGET_ACP
    AutoEncodeStrings = False
    HostName = 'www.singularti.com.br'
    Port = 0
    Database = 'Singular'
    User = 'leandro'
    Password = 'ewqiopdsa@!#'
    Protocol = 'mysql-5'
    Left = 376
    Top = 40
  end
  object cdsUsuario: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspUsuario'
    Left = 115
    Top = 216
    object cdsUsuarioCOD_USUARIO: TIntegerField
      FieldName = 'COD_USUARIO'
      Required = True
    end
    object cdsUsuarioDESCRICAO: TStringField
      FieldName = 'DESCRICAO'
      Size = 100
    end
    object cdsUsuarioLOGIN: TStringField
      FieldName = 'LOGIN'
      Size = 30
    end
    object cdsUsuarioSENHA: TStringField
      FieldName = 'SENHA'
      Size = 30
    end
    object cdsUsuarioSENHA_LIBERACAO: TStringField
      FieldName = 'SENHA_LIBERACAO'
      Size = 30
    end
    object cdsUsuarioSENHA_DATA_EXPIRA: TDateField
      FieldName = 'SENHA_DATA_EXPIRA'
    end
    object cdsUsuarioSENHA_ATUALIZAR: TStringField
      FieldName = 'SENHA_ATUALIZAR'
      Size = 5
    end
    object cdsUsuarioPERMITIR_ACESSO: TStringField
      FieldName = 'PERMITIR_ACESSO'
      Size = 5
    end
    object cdsUsuarioPERMITIR_ACESSO_RESTRITO: TStringField
      FieldName = 'PERMITIR_ACESSO_RESTRITO'
      Size = 5
    end
    object cdsUsuarioALERTA_EMAIL: TStringField
      FieldName = 'ALERTA_EMAIL'
      Size = 100
    end
    object cdsUsuarioALERTA_EMAIL_ENVIAR: TStringField
      FieldName = 'ALERTA_EMAIL_ENVIAR'
      Size = 5
    end
    object cdsUsuarioALERTA_SMS: TStringField
      FieldName = 'ALERTA_SMS'
      Size = 15
    end
    object cdsUsuarioALERTA_SMS_ENVIAR: TStringField
      FieldName = 'ALERTA_SMS_ENVIAR'
      Size = 5
    end
    object cdsUsuarioFOTO: TStringField
      FieldName = 'FOTO'
      Size = 30
    end
    object cdsUsuarioOBS: TStringField
      FieldName = 'OBS'
      Size = 10000
    end
    object cdsUsuarioDATA_CAD: TDateField
      FieldName = 'DATA_CAD'
    end
    object cdsUsuarioDATA_ALTERACAO: TDateField
      FieldName = 'DATA_ALTERACAO'
    end
  end
  object dspUsuario: TDataSetProvider
    DataSet = sqlUsuario
    Left = 115
    Top = 168
  end
  object sqlUsuario: TSQLQuery
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftString
        Name = 'login'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'senha'
        ParamType = ptInput
      end>
    SQL.Strings = (
      'select'
      '  u.cod_usuario,'
      '  u.descricao,'
      '  u.login,'
      '  u.senha,'
      '  u.senha_liberacao,'
      '  u.senha_data_expira,'
      '  u.senha_atualizar,'
      '  u.permitir_acesso,'
      '  u.permitir_acesso_restrito,'
      '  u.alerta_email,'
      '  u.alerta_email_enviar,'
      '  u.alerta_sms,'
      '  u.alerta_sms_enviar,'
      '  u.foto,'
      '  u.obs,'
      '  u.data_cad,'
      '  u.data_alteracao'
      'from USUARIO u'
      'where u.login = :login and  u.senha = :senha')
    SQLConnection = SQLConnectionBD
    Left = 115
    Top = 120
  end
  object sqlConsultaEmpUser: TSQLQuery
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftInteger
        Name = 'usuario'
        ParamType = ptInput
      end>
    SQL.Strings = (
      'select'
      '  e.cod_empresa,'
      '  e.descricao_multiempresa,'
      '  e.razao_social,'
      '  e.nome_fantasia,'
      '  e.cnpj'
      'from usuario_multiempresa u'
      'left join empresa e on (e.cod_empresa = u.lig_cod_empresa)'
      'where u.lig_cod_usuario = :usuario'
      'order by u.lig_cod_empresa')
    SQLConnection = SQLConnectionBD
    Left = 208
    Top = 120
  end
  object cdsConsultaEmpUser: TClientDataSet
    Aggregates = <>
    Params = <>
    ProviderName = 'dspConsultaEmpUser'
    Left = 208
    Top = 216
    object cdsConsultaEmpUserCOD_EMPRESA: TIntegerField
      FieldName = 'COD_EMPRESA'
    end
    object cdsConsultaEmpUserDESCRICAO_MULTIEMPRESA: TStringField
      FieldName = 'DESCRICAO_MULTIEMPRESA'
      Size = 50
    end
    object cdsConsultaEmpUserRAZAO_SOCIAL: TStringField
      FieldName = 'RAZAO_SOCIAL'
      Size = 100
    end
    object cdsConsultaEmpUserNOME_FANTASIA: TStringField
      FieldName = 'NOME_FANTASIA'
      Size = 100
    end
    object cdsConsultaEmpUserCNPJ: TStringField
      FieldName = 'CNPJ'
    end
  end
  object dspConsultaEmpUser: TDataSetProvider
    DataSet = sqlConsultaEmpUser
    Left = 208
    Top = 168
  end
  object spUsuarioAtualizarSenha: TSQLStoredProc
    MaxBlobSize = -1
    Params = <
      item
        DataType = ftInteger
        Name = 'COD_USUARIO'
        ParamType = ptInput
      end
      item
        DataType = ftString
        Name = 'SENHA'
        ParamType = ptInput
      end>
    SQLConnection = SQLConnectionBD
    StoredProcName = 'USUARIO_ATUALIZAR_SENHA'
    Left = 368
    Top = 120
  end
end
